<script type="text/javascript">
RED.nodes.registerType('ZDM-Config', {
  category: 'config',
  defaults: {
    name: { value: '默认张大妈机器人' }
  },
  label: function () {
    return this.name
  }
})
</script>

<script type="text/x-red" data-template-name="ZDM-Config">
    <div class="form-row">
        <label for="node-config-input-name"><i class="fa fa-tag"></i>配置名称</label>
        <input type="text" id="node-config-input-name">
    </div>
</script>


<script type="text/javascript">
    RED.nodes.registerType('ZDM-Bot', {
        category: 'SmartHomeFans-ZDM',
        color: '#FFFF00',
        defaults: {
            name: { value: "" },
            account: { type: "ZDM-Config", required: true },
             keywords: { value: "", required: false},
            auto:{ value: false}
        },
        inputs: 0,
        outputs: 1,
        icon: "SmartHome-Bot.png",
        paletteLabel: function () {
            return "张大妈机器人";
        },
        label: function () {
            return this.name ||  '默认过滤关键字';
        }
    });
</script>

<script type="text/x-red" data-template-name="ZDM-Bot">
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-account"><i class="fa fa-tag"></i>  机器人</label>
        <input type="text" id="node-input-account" placeholder="Account">
    </div>
    <div class="form-row">
        <label for="node-input-keywords"><i class="fa fa-cog"></i> Keywords</label>
        <input type="text" id="node-input-keywords" placeholder="过滤关键字, 空则不过滤">
    </div>
    <div class="form-row">
        <label style='width:100px;'><i class="fa fa-sign-in"></i> 控制自动反馈</label>
        <input type="checkbox" id="node-input-auto" style="display:  none; width: auto; vertical-align: top;">
      </div>
</script>

<script type="text/x-red" data-help-name="ZDM-Bot">
    <p></p>
</script>

